package com.lebang.mapper;

import com.lebang.domain.ActiveMember;
import com.lebang.domain.CencesBusMember;
import com.lebang.example.ActiveMemberExample;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import com.lebang.model.cences.OsCencesModel;

/**
 * ActiveMemberMapper继承基类
 */
@Mapper
public interface ActiveMemberMapper extends MyBatisBaseDao<ActiveMember, Long, ActiveMemberExample> {

    List<OsCencesModel> countOsActive(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end, @Param("brand") String brand, @Param("osv") String osv);

    List<OsCencesModel> countOsVersionActive(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end, @Param("brand") String brand, @Param("osVersion") String osVersion);

    ActiveMember selectOneByAppStoreAndImei(@Param("appStore") String appStore,@Param("imei") String imei,@Param("now") LocalDate now);

    List<CencesBusMember> countByTime(@Param("star") LocalDateTime star,@Param("end") LocalDateTime end);

    List<String> selectCity();

    List<CencesBusMember> activeCountByTime(@Param("star") LocalDateTime star,@Param("end") LocalDateTime end);
}